/*
 * ReverseFactor.h
 *
 *  Created on: 01-09-2013
 *      Author: Krzychu
 */

#ifndef REVERSEFACTOR_H_
#define REVERSEFACTOR_H_

#include "IAlgorithm.h"
#include "SuffixAutomaton.h"

class ReverseFactor: virtual public IAlgorithm
{
public:
	ReverseFactor();
	virtual ~ReverseFactor();
	virtual searchResult execute(std::string text, std::string pattern);
	virtual std::string getName();
protected:
	void buildSuffixAutomaton(std::string pattern, SuffixAutomaton* aut);
	std::string reverse(std::string pattern);
};

#endif /* REVERSEFACTOR_H_ */
